import { Component } from 'react';
import { Input } from 'antd';
const { Search } = Input;
class DrugAllHeader extends Component {
    constructor(props) {
        super(props);
        this.state = { 
            SearchData:[]
         }
    }
    testData=[{
            key:"李四",
            patientId: '1',
            name: '李四',
            department: '心内科',
            bed_id: 'ICU01',
            age:22,
            phone: '18812345678',
          },{
            key:"李四",
            patientId: '2',
            name: '李四',
            department: '心内科',
            bed_id: 'ICU01',
            age:22,
            phone: '18812345678',
          },{
            key:"李四",
            patientId: '3',
            name: '李四',
            department: '心内科',
            bed_id: 'ICU01',
            age:22,
            phone: '18812345678',
          }]
    onSearch(){
        setTimeout(() => {
            this.setState({ SearchData: this.testData },()=>{
                this.props.getSearchData(this.state.SearchData);
            });
        }, 2000);
    }
    render() { 
        return (
            <div><Search
            placeholder="输入病人姓名/联系方式/身份证号/科室"
            enterButton="Search"
            size="large"
            onSearch={()=>this.onSearch()}
          /></div>
        );
    }
}
 
export default DrugAllHeader;